<?php
/**
 * @link https://www.kancloud.cn/cleverstone/ymb2
 * @copyright Copyright (c) 2020 Yii Manager Software LLC
 */

namespace common\helper;

use donatj\UserAgent\UserAgentParser;
use Yii;

/**
 * Http助手
 * @author cleverstone
 * @since ym2.0
 */
class Http extends \builder\helper\Http
{
    /**
     * 获取用户终端信息
     * @return \donatj\UserAgent\UserAgent
     */
    public static function getClientInfo()
    {
        $parser = new UserAgentParser();
        return $parser->parse(Yii::$app->request->userAgent);
    }
}